package day005.stagetest;

import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入消费金额：");
        double cost = sc.nextDouble();
        if (cost >= 2000) {
            cost *= 0.7;
        } else if (cost >= 1000 && cost < 2000) {
            cost *= 0.8;
        } else if (cost >= 500 && cost < 1000) {
            cost *= 0.95;
        }
        System.out.println("最终消费：" + cost + "元");
    }
}
